package com.springboot.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

@Data
public class EnterpriseModifyDTO {

    @NotEmpty(message = "企业名称不能为空！")
    @NotNull(message = "企业名称不能为空！")
    @Size(min = 2, max = 40, message = "企业名称长度必须为2到40位！")
    private String name;

    @NotEmpty(message = "企业法人不能为空！")
    @NotNull(message = "企业法人不能为空")
    @Size(min = 2, max = 20, message = "企业法人长度必须为2到20位！")
    private String legalPerson;

    @NotEmpty(message = "工商注册号不能为空！")
    @NotNull(message = "工商注册号不能为空！")
    @Size(min = 15, max = 15, message = "工商注册号长度必须为15位！")
    private String license;

    @NotEmpty(message = "联系人不能为空！")
    @NotNull(message = "联系人不能为空！")
    @Size(min = 2, max = 40, message = "联系人长度必须为2到40位！")
    private String contact;

    @NotEmpty(message = "省份不能为空！")
    @NotNull(message = "省份不能为空！")
    private String province;

    @NotEmpty(message = "详细地址不能为空！")
    @NotNull(message = "详细地址不能为空！")
    @Size(min = 10, max = 100, message = "详细地址长度必须为10到100位！")
    private String address;

    @NotEmpty(message = "行业不能为空！")
    @NotNull(message = "行业不能为空！")
    private String industry;

    @NotNull(message = "创建时间不能为空！")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date establishTime;

    @NotEmpty(message = "企业简介不能为空！")
    @NotNull(message = "企业简介不能为空！")
    @Size(min = 10, max = 200, message = "企业简介长度必须在10到200之间！")
    private String enterpriseProfile;
    private String employeeNum;

}
